package com.wyg.blog.service.serviceimpl;

import com.wyg.blog.mapper.AuthorInformationMapper;
import com.wyg.blog.model.user.AuthorInformation;
import com.wyg.blog.service.user.AuthorInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @description:
 * @author: WYG
 * @time: 2021/1/29 22:36
 */
@Service
public class AuthorInfoServiceImpl implements AuthorInfoService {
    @Autowired
    AuthorInformationMapper mapper;

    @Override
    public Map<String, String> selectSomeInfo(Integer id) {
        return mapper.getInfo(id);
    }

    @Override
    public String selectContent(Integer id) {
        return mapper.getContent(id);
    }

    @Override
    public AuthorInformation selectInfo(Integer id) {
        return mapper.getInformation(id);
    }

    @Override
    public boolean insertInfo(AuthorInformation authorInformation) {
        return mapper.addInformation(authorInformation);
    }

    @Override
    public boolean renewInfo(AuthorInformation authorInformation) {
        return mapper.updateInformation(authorInformation);
    }
}
